﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace Galaktika.BI.Runtime.Services
{
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
    [System.ServiceModel.ServiceContractAttribute(Namespace = "http://www.galaktika.by/bi/3.0/", ConfigurationName = "DataServiceRef.DataServiceSoap")]
    public interface DataServiceSoap
    {

        [System.ServiceModel.OperationContractAttribute(AsyncPattern = true, Action = "http://www.galaktika.by/bi/3.0/InvokeCommand", ReplyAction = "*")]
        System.IAsyncResult BeginInvokeCommand(Galaktika.BI.Runtime.Services.InvokeSchema invoker, System.AsyncCallback callback, object asyncState);

        Galaktika.BI.Runtime.Services.InvokeResultSchema EndInvokeCommand(System.IAsyncResult result);

        [System.ServiceModel.OperationContractAttribute(AsyncPattern = true, Action = "http://www.galaktika.by/bi/3.0/GetDataBinderHashableValue", ReplyAction = "*")]
        System.IAsyncResult BeginGetDataBinderHashableValue(Galaktika.BI.Runtime.Services.GetDataBinderHashableValueRequest request, System.AsyncCallback callback, object asyncState);

        Galaktika.BI.Runtime.Services.GetDataBinderHashableValueResponse EndGetDataBinderHashableValue(System.IAsyncResult result);

        [System.ServiceModel.OperationContractAttribute(AsyncPattern = true, Action = "http://www.galaktika.by/bi/3.0/GetDataBinderStatusHash", ReplyAction = "*")]
        System.IAsyncResult BeginGetDataBinderStatusHash(Galaktika.BI.Runtime.Services.GetDataBinderStatusHashRequest request, System.AsyncCallback callback, object asyncState);

        Galaktika.BI.Runtime.Services.GetDataBinderStatusHashResponse EndGetDataBinderStatusHash(System.IAsyncResult result);
    }

    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
    [System.ServiceModel.MessageContractAttribute(IsWrapped = false)]
    public partial class GetDataBinderHashableValueRequest
    {

        [System.ServiceModel.MessageBodyMemberAttribute(Name = "GetDataBinderHashableValue", Namespace = "http://www.galaktika.by/bi/3.0/", Order = 0)]
        public Galaktika.BI.Runtime.Services.GetDataBinderHashableValueRequestBody Body;

        public GetDataBinderHashableValueRequest()
        {
        }

        public GetDataBinderHashableValueRequest(Galaktika.BI.Runtime.Services.GetDataBinderHashableValueRequestBody Body)
        {
            this.Body = Body;
        }
    }

    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute()]
    public partial class GetDataBinderHashableValueRequestBody
    {

        public GetDataBinderHashableValueRequestBody()
        {
        }
    }

    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
    [System.ServiceModel.MessageContractAttribute(IsWrapped = false)]
    public partial class GetDataBinderHashableValueResponse
    {

        [System.ServiceModel.MessageBodyMemberAttribute(Name = "GetDataBinderHashableValueResponse", Namespace = "http://www.galaktika.by/bi/3.0/", Order = 0)]
        public Galaktika.BI.Runtime.Services.GetDataBinderHashableValueResponseBody Body;

        public GetDataBinderHashableValueResponse()
        {
        }

        public GetDataBinderHashableValueResponse(Galaktika.BI.Runtime.Services.GetDataBinderHashableValueResponseBody Body)
        {
            this.Body = Body;
        }
    }

    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Namespace = "http://www.galaktika.by/bi/3.0/")]
    public partial class GetDataBinderHashableValueResponseBody
    {

        [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue = false, Order = 0)]
        public string GetDataBinderHashableValueResult;

        public GetDataBinderHashableValueResponseBody()
        {
        }

        public GetDataBinderHashableValueResponseBody(string GetDataBinderHashableValueResult)
        {
            this.GetDataBinderHashableValueResult = GetDataBinderHashableValueResult;
        }
    }

    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
    [System.ServiceModel.MessageContractAttribute(IsWrapped = false)]
    public partial class GetDataBinderStatusHashRequest
    {

        [System.ServiceModel.MessageBodyMemberAttribute(Name = "GetDataBinderStatusHash", Namespace = "http://www.galaktika.by/bi/3.0/", Order = 0)]
        public Galaktika.BI.Runtime.Services.GetDataBinderStatusHashRequestBody Body;

        public GetDataBinderStatusHashRequest()
        {
        }

        public GetDataBinderStatusHashRequest(Galaktika.BI.Runtime.Services.GetDataBinderStatusHashRequestBody Body)
        {
            this.Body = Body;
        }
    }

    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Namespace = "http://www.galaktika.by/bi/3.0/")]
    public partial class GetDataBinderStatusHashRequestBody
    {

        [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue = false, Order = 0)]
        public string contextId;

        public GetDataBinderStatusHashRequestBody()
        {
        }

        public GetDataBinderStatusHashRequestBody(string contextId)
        {
            this.contextId = contextId;
        }
    }

    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
    [System.ServiceModel.MessageContractAttribute(IsWrapped = false)]
    public partial class GetDataBinderStatusHashResponse
    {

        [System.ServiceModel.MessageBodyMemberAttribute(Name = "GetDataBinderStatusHashResponse", Namespace = "http://www.galaktika.by/bi/3.0/", Order = 0)]
        public Galaktika.BI.Runtime.Services.GetDataBinderStatusHashResponseBody Body;

        public GetDataBinderStatusHashResponse()
        {
        }

        public GetDataBinderStatusHashResponse(Galaktika.BI.Runtime.Services.GetDataBinderStatusHashResponseBody Body)
        {
            this.Body = Body;
        }
    }

    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Namespace = "http://www.galaktika.by/bi/3.0/")]
    public partial class GetDataBinderStatusHashResponseBody
    {

        [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue = false, Order = 0)]
        public string GetDataBinderStatusHashResult;

        public GetDataBinderStatusHashResponseBody()
        {
        }

        public GetDataBinderStatusHashResponseBody(string GetDataBinderStatusHashResult)
        {
            this.GetDataBinderStatusHashResult = GetDataBinderStatusHashResult;
        }
    }

    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
    public interface DataServiceSoapChannel : Galaktika.BI.Runtime.Services.DataServiceSoap, System.ServiceModel.IClientChannel
    {
    }

    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
    public partial class InvokeCommandCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
    {

        private object[] results;

        public InvokeCommandCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
            base(exception, cancelled, userState)
        {
            this.results = results;
        }

        public Galaktika.BI.Runtime.Services.InvokeResultSchema Result
        {
            get
            {
                base.RaiseExceptionIfNecessary();
                return ((Galaktika.BI.Runtime.Services.InvokeResultSchema)(this.results[0]));
            }
        }
    }

    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
    public partial class GetDataBinderHashableValueCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
    {

        private object[] results;

        public GetDataBinderHashableValueCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
            base(exception, cancelled, userState)
        {
            this.results = results;
        }

        public string Result
        {
            get
            {
                base.RaiseExceptionIfNecessary();
                return ((string)(this.results[0]));
            }
        }
    }

    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
    public partial class GetDataBinderStatusHashCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
    {

        private object[] results;

        public GetDataBinderStatusHashCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
            base(exception, cancelled, userState)
        {
            this.results = results;
        }

        public string Result
        {
            get
            {
                base.RaiseExceptionIfNecessary();
                return ((string)(this.results[0]));
            }
        }
    }

    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
    public partial class DataServiceSoapClient : System.ServiceModel.ClientBase<Galaktika.BI.Runtime.Services.DataServiceSoap>, Galaktika.BI.Runtime.Services.DataServiceSoap
    {

        private BeginOperationDelegate onBeginInvokeCommandDelegate;

        private EndOperationDelegate onEndInvokeCommandDelegate;

        private System.Threading.SendOrPostCallback onInvokeCommandCompletedDelegate;

        private BeginOperationDelegate onBeginGetDataBinderHashableValueDelegate;

        private EndOperationDelegate onEndGetDataBinderHashableValueDelegate;

        private System.Threading.SendOrPostCallback onGetDataBinderHashableValueCompletedDelegate;

        private BeginOperationDelegate onBeginGetDataBinderStatusHashDelegate;

        private EndOperationDelegate onEndGetDataBinderStatusHashDelegate;

        private System.Threading.SendOrPostCallback onGetDataBinderStatusHashCompletedDelegate;

        private BeginOperationDelegate onBeginOpenDelegate;

        private EndOperationDelegate onEndOpenDelegate;

        private System.Threading.SendOrPostCallback onOpenCompletedDelegate;

        private BeginOperationDelegate onBeginCloseDelegate;

        private EndOperationDelegate onEndCloseDelegate;

        private System.Threading.SendOrPostCallback onCloseCompletedDelegate;

        public DataServiceSoapClient()
        {
        }

        public DataServiceSoapClient(string endpointConfigurationName) :
            base(endpointConfigurationName)
        {
        }

        public DataServiceSoapClient(string endpointConfigurationName, string remoteAddress) :
            base(endpointConfigurationName, remoteAddress)
        {
        }

        public DataServiceSoapClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) :
            base(endpointConfigurationName, remoteAddress)
        {
        }

        public DataServiceSoapClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) :
            base(binding, remoteAddress)
        {
        }

        public event System.EventHandler<InvokeCommandCompletedEventArgs> InvokeCommandCompleted;

        public event System.EventHandler<GetDataBinderHashableValueCompletedEventArgs> GetDataBinderHashableValueCompleted;

        public event System.EventHandler<GetDataBinderStatusHashCompletedEventArgs> GetDataBinderStatusHashCompleted;

        public event System.EventHandler<System.ComponentModel.AsyncCompletedEventArgs> OpenCompleted;

        public event System.EventHandler<System.ComponentModel.AsyncCompletedEventArgs> CloseCompleted;

        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        System.IAsyncResult Galaktika.BI.Runtime.Services.DataServiceSoap.BeginInvokeCommand(Galaktika.BI.Runtime.Services.InvokeSchema invoker, System.AsyncCallback callback, object asyncState)
        {
            return base.Channel.BeginInvokeCommand(invoker, callback, asyncState);
        }

        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        Galaktika.BI.Runtime.Services.InvokeResultSchema Galaktika.BI.Runtime.Services.DataServiceSoap.EndInvokeCommand(System.IAsyncResult result)
        {
            return base.Channel.EndInvokeCommand(result);
        }

        private System.IAsyncResult OnBeginInvokeCommand(object[] inValues, System.AsyncCallback callback, object asyncState)
        {
            Galaktika.BI.Runtime.Services.InvokeSchema invoker = ((Galaktika.BI.Runtime.Services.InvokeSchema)(inValues[0]));
            return ((Galaktika.BI.Runtime.Services.DataServiceSoap)(this)).BeginInvokeCommand(invoker, callback, asyncState);
        }

        private object[] OnEndInvokeCommand(System.IAsyncResult result)
        {
            Galaktika.BI.Runtime.Services.InvokeResultSchema retVal = ((Galaktika.BI.Runtime.Services.DataServiceSoap)(this)).EndInvokeCommand(result);
            return new object[] {
                    retVal};
        }

        private void OnInvokeCommandCompleted(object state)
        {
            if ((this.InvokeCommandCompleted != null))
            {
                InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
                this.InvokeCommandCompleted(this, new InvokeCommandCompletedEventArgs(e.Results, e.Error, e.Cancelled, e.UserState));
            }
        }

        public void InvokeCommandAsync(Galaktika.BI.Runtime.Services.InvokeSchema invoker)
        {
            this.InvokeCommandAsync(invoker, null);
        }

        public void InvokeCommandAsync(Galaktika.BI.Runtime.Services.InvokeSchema invoker, object userState)
        {
            if ((this.onBeginInvokeCommandDelegate == null))
            {
                this.onBeginInvokeCommandDelegate = new BeginOperationDelegate(this.OnBeginInvokeCommand);
            }
            if ((this.onEndInvokeCommandDelegate == null))
            {
                this.onEndInvokeCommandDelegate = new EndOperationDelegate(this.OnEndInvokeCommand);
            }
            if ((this.onInvokeCommandCompletedDelegate == null))
            {
                this.onInvokeCommandCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnInvokeCommandCompleted);
            }
            base.InvokeAsync(this.onBeginInvokeCommandDelegate, new object[] {
                        invoker}, this.onEndInvokeCommandDelegate, this.onInvokeCommandCompletedDelegate, userState);
        }

        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        System.IAsyncResult Galaktika.BI.Runtime.Services.DataServiceSoap.BeginGetDataBinderHashableValue(Galaktika.BI.Runtime.Services.GetDataBinderHashableValueRequest request, System.AsyncCallback callback, object asyncState)
        {
            return base.Channel.BeginGetDataBinderHashableValue(request, callback, asyncState);
        }

        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        private System.IAsyncResult BeginGetDataBinderHashableValue(System.AsyncCallback callback, object asyncState)
        {
            Galaktika.BI.Runtime.Services.GetDataBinderHashableValueRequest inValue = new Galaktika.BI.Runtime.Services.GetDataBinderHashableValueRequest();
            inValue.Body = new Galaktika.BI.Runtime.Services.GetDataBinderHashableValueRequestBody();
            return ((Galaktika.BI.Runtime.Services.DataServiceSoap)(this)).BeginGetDataBinderHashableValue(inValue, callback, asyncState);
        }

        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        Galaktika.BI.Runtime.Services.GetDataBinderHashableValueResponse Galaktika.BI.Runtime.Services.DataServiceSoap.EndGetDataBinderHashableValue(System.IAsyncResult result)
        {
            return base.Channel.EndGetDataBinderHashableValue(result);
        }

        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        private string EndGetDataBinderHashableValue(System.IAsyncResult result)
        {
            Galaktika.BI.Runtime.Services.GetDataBinderHashableValueResponse retVal = ((Galaktika.BI.Runtime.Services.DataServiceSoap)(this)).EndGetDataBinderHashableValue(result);
            return retVal.Body.GetDataBinderHashableValueResult;
        }

        private System.IAsyncResult OnBeginGetDataBinderHashableValue(object[] inValues, System.AsyncCallback callback, object asyncState)
        {
            return this.BeginGetDataBinderHashableValue(callback, asyncState);
        }

        private object[] OnEndGetDataBinderHashableValue(System.IAsyncResult result)
        {
            string retVal = this.EndGetDataBinderHashableValue(result);
            return new object[] {
                    retVal};
        }

        private void OnGetDataBinderHashableValueCompleted(object state)
        {
            if ((this.GetDataBinderHashableValueCompleted != null))
            {
                InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
                this.GetDataBinderHashableValueCompleted(this, new GetDataBinderHashableValueCompletedEventArgs(e.Results, e.Error, e.Cancelled, e.UserState));
            }
        }

        public void GetDataBinderHashableValueAsync()
        {
            this.GetDataBinderHashableValueAsync(null);
        }

        public void GetDataBinderHashableValueAsync(object userState)
        {
            if ((this.onBeginGetDataBinderHashableValueDelegate == null))
            {
                this.onBeginGetDataBinderHashableValueDelegate = new BeginOperationDelegate(this.OnBeginGetDataBinderHashableValue);
            }
            if ((this.onEndGetDataBinderHashableValueDelegate == null))
            {
                this.onEndGetDataBinderHashableValueDelegate = new EndOperationDelegate(this.OnEndGetDataBinderHashableValue);
            }
            if ((this.onGetDataBinderHashableValueCompletedDelegate == null))
            {
                this.onGetDataBinderHashableValueCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnGetDataBinderHashableValueCompleted);
            }
            base.InvokeAsync(this.onBeginGetDataBinderHashableValueDelegate, null, this.onEndGetDataBinderHashableValueDelegate, this.onGetDataBinderHashableValueCompletedDelegate, userState);
        }

        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        System.IAsyncResult Galaktika.BI.Runtime.Services.DataServiceSoap.BeginGetDataBinderStatusHash(Galaktika.BI.Runtime.Services.GetDataBinderStatusHashRequest request, System.AsyncCallback callback, object asyncState)
        {
            return base.Channel.BeginGetDataBinderStatusHash(request, callback, asyncState);
        }

        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        private System.IAsyncResult BeginGetDataBinderStatusHash(string contextId, System.AsyncCallback callback, object asyncState)
        {
            Galaktika.BI.Runtime.Services.GetDataBinderStatusHashRequest inValue = new Galaktika.BI.Runtime.Services.GetDataBinderStatusHashRequest();
            inValue.Body = new Galaktika.BI.Runtime.Services.GetDataBinderStatusHashRequestBody();
            inValue.Body.contextId = contextId;
            return ((Galaktika.BI.Runtime.Services.DataServiceSoap)(this)).BeginGetDataBinderStatusHash(inValue, callback, asyncState);
        }

        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        Galaktika.BI.Runtime.Services.GetDataBinderStatusHashResponse Galaktika.BI.Runtime.Services.DataServiceSoap.EndGetDataBinderStatusHash(System.IAsyncResult result)
        {
            return base.Channel.EndGetDataBinderStatusHash(result);
        }

        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        private string EndGetDataBinderStatusHash(System.IAsyncResult result)
        {
            Galaktika.BI.Runtime.Services.GetDataBinderStatusHashResponse retVal = ((Galaktika.BI.Runtime.Services.DataServiceSoap)(this)).EndGetDataBinderStatusHash(result);
            return retVal.Body.GetDataBinderStatusHashResult;
        }

        private System.IAsyncResult OnBeginGetDataBinderStatusHash(object[] inValues, System.AsyncCallback callback, object asyncState)
        {
            string contextId = ((string)(inValues[0]));
            return this.BeginGetDataBinderStatusHash(contextId, callback, asyncState);
        }

        private object[] OnEndGetDataBinderStatusHash(System.IAsyncResult result)
        {
            string retVal = this.EndGetDataBinderStatusHash(result);
            return new object[] {
                    retVal};
        }

        private void OnGetDataBinderStatusHashCompleted(object state)
        {
            if ((this.GetDataBinderStatusHashCompleted != null))
            {
                InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
                this.GetDataBinderStatusHashCompleted(this, new GetDataBinderStatusHashCompletedEventArgs(e.Results, e.Error, e.Cancelled, e.UserState));
            }
        }

        public void GetDataBinderStatusHashAsync(string contextId)
        {
            this.GetDataBinderStatusHashAsync(contextId, null);
        }

        public void GetDataBinderStatusHashAsync(string contextId, object userState)
        {
            if ((this.onBeginGetDataBinderStatusHashDelegate == null))
            {
                this.onBeginGetDataBinderStatusHashDelegate = new BeginOperationDelegate(this.OnBeginGetDataBinderStatusHash);
            }
            if ((this.onEndGetDataBinderStatusHashDelegate == null))
            {
                this.onEndGetDataBinderStatusHashDelegate = new EndOperationDelegate(this.OnEndGetDataBinderStatusHash);
            }
            if ((this.onGetDataBinderStatusHashCompletedDelegate == null))
            {
                this.onGetDataBinderStatusHashCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnGetDataBinderStatusHashCompleted);
            }
            base.InvokeAsync(this.onBeginGetDataBinderStatusHashDelegate, new object[] {
                        contextId}, this.onEndGetDataBinderStatusHashDelegate, this.onGetDataBinderStatusHashCompletedDelegate, userState);
        }

        private System.IAsyncResult OnBeginOpen(object[] inValues, System.AsyncCallback callback, object asyncState)
        {
            return ((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(callback, asyncState);
        }

        private object[] OnEndOpen(System.IAsyncResult result)
        {
            ((System.ServiceModel.ICommunicationObject)(this)).EndOpen(result);
            return null;
        }

        private void OnOpenCompleted(object state)
        {
            if ((this.OpenCompleted != null))
            {
                InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
                this.OpenCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(e.Error, e.Cancelled, e.UserState));
            }
        }

        public void OpenAsync()
        {
            this.OpenAsync(null);
        }

        public void OpenAsync(object userState)
        {
            if ((this.onBeginOpenDelegate == null))
            {
                this.onBeginOpenDelegate = new BeginOperationDelegate(this.OnBeginOpen);
            }
            if ((this.onEndOpenDelegate == null))
            {
                this.onEndOpenDelegate = new EndOperationDelegate(this.OnEndOpen);
            }
            if ((this.onOpenCompletedDelegate == null))
            {
                this.onOpenCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnOpenCompleted);
            }
            base.InvokeAsync(this.onBeginOpenDelegate, null, this.onEndOpenDelegate, this.onOpenCompletedDelegate, userState);
        }

        private System.IAsyncResult OnBeginClose(object[] inValues, System.AsyncCallback callback, object asyncState)
        {
            return ((System.ServiceModel.ICommunicationObject)(this)).BeginClose(callback, asyncState);
        }

        private object[] OnEndClose(System.IAsyncResult result)
        {
            ((System.ServiceModel.ICommunicationObject)(this)).EndClose(result);
            return null;
        }

        private void OnCloseCompleted(object state)
        {
            if ((this.CloseCompleted != null))
            {
                InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
                this.CloseCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(e.Error, e.Cancelled, e.UserState));
            }
        }

        public void CloseAsync()
        {
            this.CloseAsync(null);
        }

        public void CloseAsync(object userState)
        {
            if ((this.onBeginCloseDelegate == null))
            {
                this.onBeginCloseDelegate = new BeginOperationDelegate(this.OnBeginClose);
            }
            if ((this.onEndCloseDelegate == null))
            {
                this.onEndCloseDelegate = new EndOperationDelegate(this.OnEndClose);
            }
            if ((this.onCloseCompletedDelegate == null))
            {
                this.onCloseCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnCloseCompleted);
            }
            base.InvokeAsync(this.onBeginCloseDelegate, null, this.onEndCloseDelegate, this.onCloseCompletedDelegate, userState);
        }

        protected override Galaktika.BI.Runtime.Services.DataServiceSoap CreateChannel()
        {
            return new DataServiceSoapClientChannel(this);
        }

        private class DataServiceSoapClientChannel : ChannelBase<Galaktika.BI.Runtime.Services.DataServiceSoap>, Galaktika.BI.Runtime.Services.DataServiceSoap
        {

            public DataServiceSoapClientChannel(System.ServiceModel.ClientBase<Galaktika.BI.Runtime.Services.DataServiceSoap> client) :
                base(client)
            {
            }

            public System.IAsyncResult BeginInvokeCommand(Galaktika.BI.Runtime.Services.InvokeSchema invoker, System.AsyncCallback callback, object asyncState)
            {
                object[] _args = new object[1];
                _args[0] = invoker;
                System.IAsyncResult _result = base.BeginInvoke("InvokeCommand", _args, callback, asyncState);
                return _result;
            }

            public Galaktika.BI.Runtime.Services.InvokeResultSchema EndInvokeCommand(System.IAsyncResult result)
            {
                object[] _args = new object[0];
                Galaktika.BI.Runtime.Services.InvokeResultSchema _result = ((Galaktika.BI.Runtime.Services.InvokeResultSchema)(base.EndInvoke("InvokeCommand", _args, result)));
                return _result;
            }

            public System.IAsyncResult BeginGetDataBinderHashableValue(Galaktika.BI.Runtime.Services.GetDataBinderHashableValueRequest request, System.AsyncCallback callback, object asyncState)
            {
                object[] _args = new object[1];
                _args[0] = request;
                System.IAsyncResult _result = base.BeginInvoke("GetDataBinderHashableValue", _args, callback, asyncState);
                return _result;
            }

            public Galaktika.BI.Runtime.Services.GetDataBinderHashableValueResponse EndGetDataBinderHashableValue(System.IAsyncResult result)
            {
                object[] _args = new object[0];
                Galaktika.BI.Runtime.Services.GetDataBinderHashableValueResponse _result = ((Galaktika.BI.Runtime.Services.GetDataBinderHashableValueResponse)(base.EndInvoke("GetDataBinderHashableValue", _args, result)));
                return _result;
            }

            public System.IAsyncResult BeginGetDataBinderStatusHash(Galaktika.BI.Runtime.Services.GetDataBinderStatusHashRequest request, System.AsyncCallback callback, object asyncState)
            {
                object[] _args = new object[1];
                _args[0] = request;
                System.IAsyncResult _result = base.BeginInvoke("GetDataBinderStatusHash", _args, callback, asyncState);
                return _result;
            }

            public Galaktika.BI.Runtime.Services.GetDataBinderStatusHashResponse EndGetDataBinderStatusHash(System.IAsyncResult result)
            {
                object[] _args = new object[0];
                Galaktika.BI.Runtime.Services.GetDataBinderStatusHashResponse _result = ((Galaktika.BI.Runtime.Services.GetDataBinderStatusHashResponse)(base.EndInvoke("GetDataBinderStatusHash", _args, result)));
                return _result;
            }
        }
    }
}
